//
//  ContentTableHeaderView.swift
//  StealPicture
//
//  Created by 郭斌勇 on 16/8/19.
//  Copyright © 2016年 ?! 郭斌勇. All rights reserved.
//

import UIKit

class ContentTableHeaderView: UITableViewHeaderFooterView{

    
    @IBOutlet weak var 类型Lab: UILabel!
    @IBOutlet weak var 时间Lab: UILabel! 
    
    @IBOutlet weak var 描述Lab: UILabel!
    
    
    
    var 时间str:String? {
        
        didSet{
            guard let 原始时间 = 时间str else {
                return
            }
            
            var 时间格式 = NSDateFormatter()
            时间格式.dateFormat = "yyyy-MM-dd HH:mm:ss.S"
            
            let date = 时间格式.dateFromString(原始时间)
            guard let 解封date = date else {
                return
            }
            时间格式.dateFormat = "yyyy-MM-dd"
            let 结果时间 = 时间格式.stringFromDate(解封date)
            时间Lab.text = 结果时间
            
        }
        
        
    }
    
    /*
    // Only override drawRect: if you perform custom drawing.
    // An empty implementation adversely affects performance during animation.
    override func drawRect(rect: CGRect) {
        // Drawing code
    }
    */

}
